using System.ComponentModel.DataAnnotations;

namespace RabbitTraceability.Api.Dtos.Request
{
    /// <summary>
    /// 添加溯源信息请求DTO
    /// </summary>
    public class AddTraceabilityInfoRequestDto
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        [Required(ErrorMessage = "商品名称不能为空")]
        [StringLength(100, ErrorMessage = "商品名称长度不能超过100个字符")]
        public string ProductName { get; set; } = string.Empty;

        /// <summary>
        /// 生产批次
        /// </summary>
        [Required(ErrorMessage = "生产批次不能为空")]
        [StringLength(50, ErrorMessage = "生产批次长度不能超过50个字符")]
        public string ProductionBatch { get; set; } = string.Empty;

        /// <summary>
        /// 保质期
        /// </summary>
        [Required(ErrorMessage = "保质期不能为空")]
        [StringLength(50, ErrorMessage = "保质期长度不能超过50个字符")]
        public string ShelfLife { get; set; } = string.Empty;

        /// <summary>
        /// 生产许可证号
        /// </summary>
        [Required(ErrorMessage = "生产许可证号不能为空")]
        [StringLength(100, ErrorMessage = "生产许可证号长度不能超过100个字符")]
        public string ProductionLicense { get; set; } = string.Empty;

        /// <summary>
        /// 生产企业
        /// </summary>
        [Required(ErrorMessage = "生产企业不能为空")]
        [StringLength(200, ErrorMessage = "生产企业名称长度不能超过200个字符")]
        public string Manufacturer { get; set; } = string.Empty;

        /// <summary>
        /// 封面图
        /// </summary>
        [Required(ErrorMessage = "封面图不能为空")]
        public string CoverImage { get; set; } = string.Empty;
    }
}